package com.demo.mapper;

import com.demo.entity.Student;
import org.apache.ibatis.annotations.*;

@Mapper
public interface StudentMapper {
    @Select("select * from students where id = #{id}")
    Student findById(Integer id);

    @Insert("insert into students(qq, name) values(#{qq}, #{name})")
    int add(Student student);

    @Update("update students set qq = #{qq}, name = #{name} where id = #{id}")
    int update(Student student);

    @Delete("delete from students where id = #{id}")
    int delete(Integer id);
}